package com.edu.juc.introduction.tickets.lock;

public class ReentrantTest {
    public static void main(String[] args) {
        Tickets tickets = new Tickets();
        new Thread(() -> {
            for (int i = 0; i < 10; i++) {
                tickets.sell();
            }
        }, "t1").start();

        new Thread(() -> {
            for (int i = 0; i < 10; i++) {
                tickets.sell();
            }
        }, "t2").start();

        new Thread(() -> {
            for (int i = 0; i < 10; i++) {
                tickets.sell();
            }
        }, "t3").start();
    }
}
